package com.hyt.it.ogt.pj.enums;

import lombok.Getter;

/**
 * @Description:
 * @Author: STARF
 * @CreateDate: 2022/04/09 17:43
 **/
@Getter
public enum MarkStatusTransFinishEnum {

    PIECCE_SCORE_FINSH_0(0,0, "未开始"),
    PIECCE_SCORE_FINSH_1(1,2, "已完成"),
    PIECCE_SCORE_FINSH_2(2,1, "进行中");


    private Integer finish;
    private Integer markStatus;
    private String desc;

    MarkStatusTransFinishEnum(Integer finish,Integer markStatus, String desc) {
        this.finish = finish;
        this.markStatus = markStatus;
        this.desc = desc;
    }

    public static MarkStatusTransFinishEnum getByMarkStatus(Integer finish) {
        for (MarkStatusTransFinishEnum value : values()) {
            if (value.getFinish().equals(finish)) {
                return value;
            }
        }
        return null;
    }


    public static MarkStatusTransFinishEnum getByFinish(Integer markStatus) {
        for (MarkStatusTransFinishEnum value : values()) {
            if (value.getMarkStatus().equals(markStatus)) {
                return value;
            }
        }
        return null;
    }


}
